package com.aspose.cells;

import java.util.ArrayList;
import java.util.HashMap;

class zaej {
   ArrayList a = null;
   ArrayList b = null;
   ArrayList c = null;
   ArrayList d = null;
   private int f = -1;
   private Worksheet g;
   private ArrayList h = new ArrayList();
   private Row i = null;
   private int j = 1;
   private zaem k = null;
   private zaeh l = null;
   private zaed m = null;
   boolean e = false;
   private HtmlSaveOptions n;
   private boolean o;
   private boolean p;
   private String q;
   private boolean r = false;

   public void a(String var1) {
      this.q = var1;
   }

   ArrayList a() {
      return this.h;
   }

   zaej(zaeh var1, zaem var2, Row var3, int var4, HtmlSaveOptions var5, String var6) {
      this.l = var1;
      this.k = var2;
      this.g = var2.a();
      this.f = var4;
      this.i = var3;
      this.m = var1.d();
      this.n = var5;
      this.o = this.n.getHtmlCrossStringType() != 1;
      this.p = this.n.getHtmlCrossStringType() == 2;
      this.q = var6;
   }

   int b() {
      return this.j;
   }

   void a(int var1) {
      this.j = var1;
   }

   Row c() {
      return this.i;
   }

   int d() {
      return this.f;
   }

   zaem e() {
      return this.k;
   }

   void a(zaee var1) {
      this.e(var1);
      int var3;
      if (var1.h != null && var1.h.isFormula()) {
         String var2 = var1.h.getFormula();
         if (var2 == null) {
            var2 = var1.h.getFormula();
         }

         if (var2 != null && var2.startsWith("=HYPERLINK(")) {
            var3 = var2.indexOf(41);
            int var4 = "=HYPERLINK(".length();
            String[] var5 = com.aspose.cells.b.a.zv.d(var2.substring(var4, var4 + (var3 - var4)), ',');
            var1.g = new Hyperlink();
            var1.g.a = var5[0].substring(1, 1 + (var5[0].length() - 2));
            if (var5.length > 1) {
               var1.g.b(var5[1].substring(1, 1 + (var5[1].length() - 2)));
            }
         }
      }

      if (this.a != null || this.b != null || this.c != null || this.d != null) {
         int var18 = var1.a;
         if (this.a != null) {
            for(var3 = 0; var3 < this.a.size(); ++var3) {
               CellArea var19 = (CellArea)this.a.get(var3);
               if (var18 >= var19.StartColumn && var18 <= var19.EndColumn) {
                  if (var19.StartRow != this.f || var19.StartColumn != var18) {
                     var1.d = true;
                     break;
                  }

                  var1.c = true;
                  var1.e = var19.EndRow - var19.StartRow + 1;
                  var1.f = var19.EndColumn - var19.StartColumn + 1;
                  int var22 = 0;
                  Color var6 = Color.getWhite();
                  Cells var7 = this.g.getCells();
                  int var8 = 0;
                  Color var9 = Color.getWhite();
                  Style var10 = var7.getCellStyle(var19.StartRow, var19.EndColumn);
                  Style var11 = var7.getCellStyle(var19.EndRow, var19.EndColumn);
                  if (var10.d() != null) {
                     var22 = var10.d().getByBorderType(2).getLineStyle();
                     var6 = var10.d().getByBorderType(2).getColor();
                  }

                  if (var11.d() != null) {
                     var8 = var11.d().getByBorderType(8).getLineStyle();
                     var9 = var11.d().getByBorderType(8).getColor();
                  }

                  Border var12 = null;

                  BorderCollection var13;
                  for(int var14 = var19.StartColumn; var14 <= var19.EndColumn; ++var14) {
                     var13 = var7.getCellStyle(var19.EndRow, var14).d();
                     if (var13 == null) {
                        var8 = 0;
                        var9 = Color.getWhite();
                        break;
                     }

                     var12 = var13.getByBorderType(8);
                     if (var12.getLineStyle() == 0 || (var12.getColor().toArgb() & 16777215) == 16777215) {
                        var8 = 0;
                        var9 = Color.getWhite();
                        break;
                     }
                  }

                  Border var24 = null;

                  for(int var15 = var19.StartRow; var15 <= var19.EndRow; ++var15) {
                     var13 = var7.getCellStyle(var15, var19.EndColumn).d();
                     if (var13 == null) {
                        var22 = 0;
                        var6 = Color.getWhite();
                        break;
                     }

                     var24 = var13.getByBorderType(2);
                     if (var24.getLineStyle() == 0 || (var24.getColor().toArgb() & 16777215) == 16777215) {
                        var22 = 0;
                        var6 = Color.getWhite();
                        break;
                     }
                  }

                  if (var1.h != null) {
                     Style var25 = var1.h.getStyle();
                     Border var16;
                     Border var17;
                     if (var22 != 0 || var8 != 0 || var25.d() != null) {
                        var16 = var25.getBorders().getByBorderType(2);
                        var16.setLineStyle(var22);
                        var16.setColor(var6);
                        var17 = var25.getBorders().getByBorderType(8);
                        var17.setLineStyle(var8);
                        var17.setColor(var9);
                     }

                     if (var22 != 0 || var8 != 0 || var1.j.d() != null) {
                        var16 = var1.j.getBorders().getByBorderType(2);
                        var16.setLineStyle(var22);
                        var16.setColor(var6);
                        var17 = var1.j.getBorders().getByBorderType(8);
                        var17.setLineStyle(var8);
                        var17.setColor(var9);
                        var1.h.setStyle(var25);
                        var1.i = this.g.c().B().a(var25, var25.h());
                     }
                     break;
                  }
               }
            }
         }

         if (this.b != null) {
            for(var3 = 0; var3 < this.b.size(); ++var3) {
               Hyperlink var20 = (Hyperlink)this.b.get(var3);
               CellArea var23 = var20.getArea();
               if (var18 >= var23.StartColumn && var18 <= var23.EndColumn) {
                  var1.g = var20;
               }
            }
         }

         if (this.d != null) {
            for(var3 = 0; var3 < this.d.size(); ++var3) {
               zaek var21 = (zaek)this.d.get(var3);
               if (var21.c() == var18 || var1.c && var21.c() >= var1.a && var21.c() <= var1.a + var1.f - 1) {
                  if (var1.l == null) {
                     var1.l = new ArrayList();
                  }

                  com.aspose.cells.b.a.a.ze.a(var1.l, (Object)var21);
               }
            }
         }

      }
   }

   void a(int var1, int var2, int var3) throws Exception {
      this.a(var1, var2 - 1);
      zaee var4 = new zaee(var1, var2);
      var4.i = var3;
      var4.j = this.g.getWorkbook().getStyleInPool(var3);
      this.b(var4);
   }

   void a(Cell var1) throws Exception {
      this.a(var1.getRow(), var1.getColumn() - 1);
      zaee var2 = new zaee(var1);
      this.b(var2);
   }

   private void b(zaee var1) throws Exception {
      int var2 = this.h.size();
      zaen var3 = null;
      if (var2 > 0) {
         var3 = (zaen)this.h.get(var2 - 1);
      }

      this.a(var1);
      if (var1.d || var1.c) {
         if (var3 != null) {
            var3.e = false;
         }

         if (var1.d) {
            return;
         }
      }

      if (var3 != null && var3.a != null && var3.a.getType() != 3 && var3.l && (var3.m == -1 || var3.m >= var1.a) && this.a(var3, var1)) {
         ++var3.c;
      } else {
         this.c(var1);
      }

   }

   void a(int var1, int var2) throws Exception {
      int var3 = 0;
      int var4 = this.h.size();
      zaen var5 = null;
      if (var4 > 0) {
         var5 = (zaen)this.h.get(var4 - 1);
         var3 = var5.b + var5.c;
      }

      for(int var6 = var3; var6 <= var2; ++var6) {
         zaee var7 = new zaee(var1, var6);
         this.a(var7);
         if (var7.d || var7.c) {
            if (var5 != null) {
               var5.e = false;
            }

            if (var7.d) {
               continue;
            }
         }

         if (var5 != null && var5.l && (var5.m == -1 || var5.m >= var7.a) && this.a(var5, var7) && this.a(var5)) {
            ++var5.c;
         } else {
            var5 = this.c(var7);
         }
      }

   }

   private boolean a(zaen var1) {
      int var2 = this.a == null ? -1 : this.a.size();
      if (var1.a != null && var2 >= 1) {
         int var4 = var1.a.getRow();
         int var5 = var1.a.getColumn();

         for(int var6 = 0; var6 < var2; ++var6) {
            CellArea var3 = (CellArea)this.a.get(var6);
            if (var4 >= var3.StartRow && var4 <= var3.EndRow && var5 >= var3.StartColumn && var5 <= var3.EndColumn) {
               return true;
            }
         }

         return false;
      } else {
         return false;
      }
   }

   private void b(zaen var1) throws Exception {
      if (var1.j) {
         var1.l = false;
      } else {
         Cell var2 = var1.a;
         if (var2 != null && var2.getType() != 3) {
            Style var3 = var1.g;
            if (var3 != null && (var3.isTextWrapped() || var3.getHorizontalAlignment() == 6 || var3.getRotationAngle() == 255 || var3.getRotationAngle() == 90)) {
               var1.l = false;
            } else {
               if (!this.p && var2.c.c == 4) {
                  String var4 = var2.getStringValue();
                  new StringBuilder(var4.length() + 100);
                  int var6 = 0;
                  int var8;
                  if (var2.isRichText()) {
                     ArrayList var7 = var2.J();

                     for(var8 = 0; var8 < var7.size(); ++var8) {
                        zot var9 = (zot)var7.get(var8);
                        var9.c = this.m.a(var9.b, var9.a);
                        var6 += var9.c;
                     }
                  } else {
                     var6 = this.m.a(var1.g, var4);
                  }

                  int var10 = 0;

                  for(var8 = var1.b; var8 <= this.k.b(); ++var8) {
                     var10 += this.k.a(var8);
                     if (var10 >= var6 + 3) {
                        if (var8 > var1.b) {
                           var1.l = true;
                           var1.m = var8;
                        }

                        return;
                     }
                  }
               }

               var1.l = false;
            }
         } else {
            var1.l = true;
         }
      }
   }

   private zaen c(zaee var1) throws Exception {
      zaen var2 = new zaen(this);
      com.aspose.cells.b.a.a.ze.a(this.h, (Object)var2);
      var2.a = var1.h;
      var2.b = var1.a;
      var2.f = var1.i;
      var2.g = var1.j;
      var2.i = var1.k;
      var2.c = var1.f;
      var2.d = var1.e;
      var2.h = var1.g;
      var2.j = var1.c;
      var2.n = var1.l;
      var2.q = var1.m;
      this.b(var2);
      if (var2.j) {
         this.c(var2);
      }

      return var2;
   }

   private void c(zaen var1) {
      if (var1.j) {
         int var2 = var1.b + var1.c - 1;
         int var3 = this.d() + var1.d - 1;
         Cell var4 = this.g.getCells().checkCell(var3, var2);
         if (var4 != null) {
            Style var5 = var4.p();
            if (var5 != null) {
               BorderCollection var6 = var5.d();
               if (var6 != null) {
                  Border var7 = var6.getByBorderType(2);
                  Border var8 = var6.getByBorderType(8);
                  if (var7.getLineStyle() != 0) {
                     var1.o = var7;
                  }

                  if (var8.getLineStyle() != 0) {
                     var1.p = var8;
                  }

               }
            }
         }
      }
   }

   private void d(zaee var1) {
      if (var1.h != null || this.g.m != null && this.g.m.getCount() != 0) {
         if (var1.h == null && this.g.m != null && this.g.m.getCount() > 0) {
            int var12 = var1.b;
            int var13 = var1.a;
            ConditionalFormattingCollection var4 = this.g.getConditionalFormattings();
            FormatConditionCollection var5 = null;
            ArrayList var6 = new ArrayList();
            ArrayList var7 = null;

            label57:
            for(int var8 = 0; var8 < var4.getCount(); ++var8) {
               var5 = var4.get(var8);
               var7 = var5.b;

               for(int var9 = 0; var9 < var7.size(); ++var9) {
                  CellArea var10 = (CellArea)var7.get(var9);
                  if (var12 >= var10.StartRow && var12 <= var10.EndRow && var13 >= var10.StartColumn && var13 <= var10.EndColumn) {
                     var1.k = true;
                     int var11 = 0;

                     while(true) {
                        if (var11 >= var5.a().size()) {
                           continue label57;
                        }

                        com.aspose.cells.b.a.a.ze.a(var6, var5.a().get(var11));
                        ++var11;
                     }
                  }
               }
            }

            if (var1.k) {
               Cell var14 = this.g.getCells().checkCell(var1.b, (short)var1.a);
               this.l.w.g = var1.b;
               this.l.w.h = (short)var1.a;
               zee var15 = zka.a(this.g, var14, this.l.w, var14 == null ? this.g.getCells().getCellStyle(var1.b, var1.a) : var14.getStyle(), true);
               var1.j = var15.b;
            }

         } else {
            boolean var2 = true;
            boolean[] var3 = new boolean[]{var2};
            var1.j = var1.h.a(var3);
            var2 = var3[0];
            if (!var2) {
               var1.k = true;
            }

         }
      }
   }

   private void e(zaee var1) {
      if (var1.i == -1) {
         Column var2 = this.g.getCells().getColumns().get(var1.a);
         if (var2 != null && var2.c() != -1) {
            var1.i = var2.c();
            var1.j = var2.f();
         }

         if (this.i != null && this.i.d() != -1) {
            var1.i = this.i.d();
            var1.j = this.i.i();
         }
      }

      this.d(var1);
   }

   private boolean a(zaen var1, zaee var2) {
      if (!var1.e) {
         return false;
      } else if (var1.n == null && var2.l == null) {
         Style var3 = var1.a == null ? null : var1.a.o();
         if (var3 != null && var3.isTextWrapped()) {
            return false;
         } else if (var2.h != null && var2.h.c.c != 0) {
            return false;
         } else {
            Column var4 = this.g.getCells().getColumns().get(var1.b);
            Column var5 = this.g.getCells().getColumns().get(var2.a);
            if (var4 != null && var5 != null && var4.isHidden() != var5.isHidden()) {
               return false;
            } else {
               zafl var6 = new zafl(this.l.h(), var1.g, var2.j);
               if (!var6.c()) {
                  return false;
               } else if (!var1.i && !var2.k && var1.f == var2.i) {
                  return true;
               } else if (!var6.a()) {
                  return false;
               } else if (!var6.b()) {
                  return false;
               } else {
                  var1.o = var6.d();
                  return true;
               }
            }
         }
      } else {
         return false;
      }
   }

   ArrayList f() throws Exception {
      if (this.g()) {
         return this.h();
      } else {
         if (this.h == null || this.h.size() == 0) {
            this.a(this.f, this.k.b());
         }

         ArrayList var1 = new ArrayList(this.h.size());

         for(int var2 = 0; var2 < this.h.size(); ++var2) {
            zaen var3 = (zaen)this.h.get(var2);
            String var4 = this.d(var3);
            if (var4 != null) {
               com.aspose.cells.b.a.a.ze.a(var1, (Object)var4);
            }
         }

         return var1;
      }
   }

   private String d(zaen var1) throws Exception {
      this.r = false;
      String var2;
      if (var1.n != null && var1.n.size() != 0) {
         var2 = this.e(var1);
      } else {
         var2 = this.b(var1, false);
      }

      return var2;
   }

   private String e(zaen var1) throws Exception {
      int var2 = var1.n.size();
      String var3 = this.b(var1, true);
      StringBuilder var4 = new StringBuilder(100 * var2 + var3.length());
      this.r = true;
      this.a(var4, var1, true, false);
      String var5 = this.a(var1, false);
      String var6 = this.a(com.aspose.cells.b.a.zr.a(var4), var5);
      if (null != var6) {
         var5 = var6;
      }

      var4.append(var5);
      var4.append(" align=left valign=top>");

      for(int var7 = var2 - 1; var7 >= 0; --var7) {
         zaek var8 = (zaek)var1.n.get(var7);
         String var9 = this.a(var8, var1);
         var4.append(var9);
      }

      var4.append("<span  style='mso-ignore:vglayout2'>");
      var4.append("<table cellpadding=0 cellspacing=0>");
      var4.append("<tr>");
      var4.append(var3);
      var4.append("</tr>");
      var4.append("</table>");
      var4.append("</span>");
      var4.append("</td>");
      return com.aspose.cells.b.a.zr.a(var4);
   }

   private String a(zaek var1, zaen var2) throws Exception {
      StringBuilder var3 = new StringBuilder(100);
      Shape var4 = var1.f();
      com.aspose.cells.b.a.b.zq var5 = var4.W();
      int var6 = com.aspose.cells.b.a.ze.f(var5.h());
      int var7 = com.aspose.cells.b.a.ze.f(var5.i());
      int var8 = (int)(var5.j() + 0.5F);
      int var9 = (int)(var5.k() + 0.5F);
      float var10 = (float)var4.getWidth();
      float var11 = (float)var4.getHeight();
      double var12 = var4.getRotationAngle();
      if (var12 < 0.0D) {
         var12 += 360.0D;
      }

      if (var12 != 0.0D && var12 != 180.0D && var12 != 90.0D && var12 != 270.0D) {
         if (var10 > var11) {
            var9 -= (int)Math.abs(var5.i() / 2.0F - var11 / 2.0F);
            var8 += (int)Math.abs(var5.h() / 2.0F - var10 / 2.0F);
         } else {
            var9 += (int)Math.abs(var5.i() / 2.0F - var11 / 2.0F);
            var8 -= (int)Math.abs(var5.h() / 2.0F - var10 / 2.0F);
         }
      }

      if (var2.j) {
         int var14;
         if (var1.c() > var2.b) {
            for(var14 = var2.b; var14 < var1.c(); ++var14) {
               var8 += this.k.a(var14);
            }
         }

         if (var1.a() > this.d()) {
            for(var14 = this.d(); var14 < var1.a(); ++var14) {
               var9 += this.g.getCells().getRowHeightPixel(var14);
            }
         }
      }

      var3.append("<span style='mso-ignore:vglayout;position:absolute;");
      var3.append("z-index:" + var4.x());
      var3.append(";margin-left:");
      var3.append(zase.y(var8));
      var3.append("px;margin-top:");
      var3.append(zase.y(var9));
      var3.append("px;width:");
      var3.append(zase.y(var6));
      var3.append("px;height:");
      var3.append(zase.y(var7));
      var3.append("px'>");
      boolean var20 = false;
      if (var1.f() != null && var1.f().getHyperlink() != null && !"".equals(var1.f().getHyperlink().getAddress().trim())) {
         var20 = true;
      }

      if (var20) {
         var3.append("<a href=\"");
         var3.append(var1.f().getHyperlink().getAddress());
         var3.append("\">");
      }

      var3.append("<img width=");
      var3.append(zase.y(var6));
      var3.append(" height=");
      var3.append(zase.y(var7));
      if (this.n.getExportImagesAsBase64()) {
         var3.append(" src=\"");
         var3.append("data:image/png;base64,");
         com.aspose.cells.b.a.d.zh var15 = new com.aspose.cells.b.a.d.zh();
         ImageOrPrintOptions var16 = new ImageOrPrintOptions();
         var16.setChartImageType(ImageFormat.getPng());
         var16.setImageFormat(ImageFormat.getPng());
         var4.a((com.aspose.cells.b.a.d.zm)var15, (ImageOrPrintOptions)var16);
         String var17 = com.aspose.cells.b.a.ze.a(var15.m(), 0, (int)var15.h());
         var3.append(var17);
         var3.append("\"");
         int var18 = var17.length();
         if (var18 >= 32768) {
            HashMap var19 = (HashMap)this.l.a.get(this.g.m());
            if (var19 == null) {
               var19 = new HashMap();
               this.l.a.put(this.g.m(), var19);
               var19.put("image000", this.a(var15));
               var3.append(" id='image000'");
            } else {
               var3.append(" id='image00");
               var3.append(var19.size());
               var3.append("'");
               var19.put("image00" + var19.size(), this.a(var15));
            }
         }

         var15.a();
      } else {
         var3.append(" src=\"");
         if (this.q == null) {
            var3.append(com.aspose.cells.b.a.zv.a(var1.e(), "#", "%23"));
         } else {
            var3.append(com.aspose.cells.b.a.zv.a(this.q + var1.e(), "#", "%23"));
         }

         var3.append("\"");
      }

      if (!"".equals(var4.getName())) {
         var3.append(" name='");
         var3.append(var4.getName());
         var3.append("'");
      }

      if (var4.getMsoDrawingType() == 11) {
         var3.append(" shapeType='");
         var3.append("checkbox");
         var3.append("'");
      }

      if (!"".equals(var4.getAlternativeText())) {
         var3.append(" alt=");
         var3.append(var4.getAlternativeText());
      }

      var3.append(">");
      if (var20) {
         var3.append("</a>");
      }

      var3.append("</span>");
      return com.aspose.cells.b.a.zr.a(var3);
   }

   private String a(com.aspose.cells.b.a.d.zh var1) throws Exception {
      String var2 = com.aspose.cells.b.a.ze.a(var1.m(), 0, (int)var1.h());

      for(int var3 = var2.length(); var3 >= 32768; var3 = var2.length()) {
         double var4 = 0.0D;
         double var6 = 0.0D;
         com.aspose.cells.b.a.b.zj var8 = com.aspose.cells.b.a.b.zj.a((com.aspose.cells.b.a.d.zm)var1);
         if (var8.i() >= var8.h()) {
            var4 = (double)(var8.i() - 80);
            var6 = var4 * (double)var8.h() / (double)var8.i();
         } else if (var8.h() >= var8.i()) {
            var6 = (double)(var8.h() - 50);
            var4 = var6 * (double)var8.i() / (double)var8.h();
         }

         com.aspose.cells.b.a.b.za var9 = new com.aspose.cells.b.a.b.za((int)var4, (int)var6, var8.c());
         com.aspose.cells.b.a.b.zi var10 = com.aspose.cells.b.a.b.zi.a((com.aspose.cells.b.a.b.zj)var9);
         var10.b(2);
         var10.c(7);
         var10.a(var8, 0.0F, 0.0F, (float)var9.i(), (float)var9.h());
         var1 = new com.aspose.cells.b.a.d.zh();
         var9.a(var1, ImageFormat.getPng());
         var2 = com.aspose.cells.b.a.ze.a(var1.m(), 0, (int)var1.h());
      }

      return var2;
   }

   private int a(zaen var1, zaem var2) {
      ArrayList var3 = this.k.d();
      zaeg var4 = null;
      int var5 = 0;
      int var6 = 0;

      int var7;
      for(var7 = 0; var7 < var3.size(); ++var7) {
         var4 = (zaeg)var3.get(var7);
         if (var4.a + var4.b > var1.b) {
            if (var1.b + var1.c <= var4.a) {
               break;
            }

            if (var4.d && var1.c > 1) {
               int var8 = 0;
               if (var4.a <= var1.b && var4.a + var4.b > var1.b) {
                  if (var4.a + var4.b <= var1.b + var1.c) {
                     var8 = var4.a + var4.b - var1.b;
                  } else {
                     var8 = var1.c;
                  }
               } else if (var4.a > var1.b && var4.a < var1.b + var1.c) {
                  if (var4.a + var4.b <= var1.b + var1.c) {
                     var8 = var4.b;
                  } else {
                     var8 = var1.c + var1.b - var4.a;
                  }
               }

               var5 += var8;
               if (this.n.getHiddenColDisplayType() == 1) {
                  var6 += var8;
               }
            }
         }
      }

      var7 = var1.c - var5;
      var1.c = var7 > var1.c ? var1.c : var7;
      if (this.n.getHiddenColDisplayType() == 1) {
         if (var6 > 0) {
            var7 = var7 + var5 - var6;
         } else {
            var7 = var1.c;
         }
      } else {
         var7 += var5;
      }

      if (var1.c < 1) {
         var1.c = 1;
      }

      return var7;
   }

   private void a(StringBuilder var1, zaen var2, boolean var3, boolean var4) {
      var1.append("<td");
      int var5 = this.a(var2, this.k);
      if (var5 > 1) {
         var1.append(" colspan=").append(zase.y(var5));
         HashMap var6 = (HashMap)this.l.c.get(this.g.m());
         if (var6 == null) {
            var6 = new HashMap();
            var6.put("tc0", var2.c);
            this.l.c.put(this.g.m(), var6);
            var1.append(" id='tc0'");
         } else {
            var1.append(" id='tc");
            var1.append(var6.size());
            var1.append("'");
            var6.put("tc" + var6.size(), var2.c);
         }
      }

      if (var2.d > 1) {
         var1.append(" rowspan=").append(zase.y(var2.d));
      }

      if (var2.a() && var2.d <= this.k.c() + 1) {
         double var9 = var2.d();
         var1.append(" height=").append(zase.y(this.m.a(var9)));
      }

      int var10;
      if (var3 && var2.f != 15 && var2.f != -1) {
         var10 = var2.f;
         Style var7 = this.g.c().B().a(var2.f);
         Style var8;
         if (var7.f() && var4) {
            var8 = new Style(this.g.c());
            var8.copy(var7);
            var8.getBorders().setStyle(0);
            var8.getBorders().setColor(Color.getWhite());
            var10 = this.g.c().B().c(var8);
         }

         if (this.r) {
            var8 = new Style(this.g.c());
            var8.copy(var7);
            var8.setHorizontalAlignment(5);
            var8.setVerticalAlignment(5);
            var10 = this.g.c().B().c(var8);
         }

         var1.append(" class=").append(this.l.c().getCellCssPrefix()).append("x").append(zase.y(var10));
      }

      if (this.e || var2.n != null) {
         var2.c = var5;
         var10 = var2.e();
         if (var2.c < 2) {
            var1.append(" width=").append(zase.y(var10));
         }
      }

   }

   private String a(zaen var1, boolean var2) throws Exception {
      StringBuilder var3 = new StringBuilder(100);
      var3.append(" style='");
      if (var1.a != null && var1.a.getStyle().getHorizontalAlignment() == 5 && var1.a.getType() == 4) {
         var3.append("text-align:right;");
      }

      String var4 = null;
      if (var1.c > 1 && !var1.j) {
         var3.append("mso-ignore:colspan;");
      }

      if (var1.i) {
         var3.append("mso-ignore:style;");
      }

      if (var1.o != null || var1.p != null) {
         String var5;
         if (var1.o != null && !var2) {
            var5 = this.a(var1.o, 2);
            if (var5 != null) {
               var3.append(var5);
            }
         }

         if (var1.p != null && !var2) {
            var5 = this.a(var1.p, 8);
            if (var5 != null) {
               var3.append(var5);
            }
         }
      }

      if (var1.a() && var1.d <= this.k.c() + 1) {
         var3.append("height:");
         var3.append(zase.b(var1.d()));
         var3.append("pt;");
      }

      ArrayList var6;
      int var7;
      if (!this.e && var1.n == null) {
         var7 = var1.e();
         if (var7 == 0) {
            var6 = (ArrayList)this.l.b.get(this.g.m());
            if (var6 == null) {
               var6 = new ArrayList();
               com.aspose.cells.b.a.a.ze.a(var6, (Object)"t0");
               this.l.b.put(this.g.m(), var6);
               var4 = "id='t0'";
            } else {
               var4 = "id='t" + var6.size() + "'";
               com.aspose.cells.b.a.a.ze.a(var6, (Object)("t" + var6.size()));
            }
         }
      } else {
         var7 = var1.e();
         if (var7 != 0 && (var1.c == 1 || !this.e)) {
            var3.append("width:").append(zase.b(this.m.a(var7))).append("pt;");
         }

         if (var7 == 0) {
            var6 = (ArrayList)this.l.b.get(this.g.m());
            if (var6 == null) {
               var6 = new ArrayList();
               com.aspose.cells.b.a.a.ze.a(var6, (Object)"t0");
               this.l.b.put(this.g.m(), var6);
               var4 = "id='t0'";
            } else {
               var4 = "id='t" + var6.size() + "'";
               com.aspose.cells.b.a.a.ze.a(var6, (Object)("t" + var6.size()));
            }
         }
      }

      if (var1.i) {
         this.a(var1, var3);
      }

      var7 = this.k.a(var1.b, var1.b + var1.c);
      if (var7 > 0 && var1.a != null && var1.a.getStringValue().length() > 0 && var7 < this.m.a(var1.g, var1.a.getStringValue()) && var1.d > 1 && var1.g != null && var1.g.getHorizontalAlignment() == 6) {
         var3.append("white-space:normal;word-wrap:break-word;");
      }

      var3.append("'");
      String var8 = com.aspose.cells.b.a.zr.a(var3);
      if (var8.equals(" style=''")) {
         var8 = "";
      }

      if (var4 != null) {
         var8 = var8 + " " + var4;
      }

      return var8;
   }

   private void a(zaen var1, StringBuilder var2) throws Exception {
      Style var3 = null;
      if (var1.g != null) {
         var3 = var1.g;
      }

      if (var3 == null && var1.a != null && var1.a.getStyle() != null) {
         var3 = var1.a.getStyle();
      }

      if (null != var3) {
         StringBuilder var4 = new StringBuilder(350);
         this.a(var3.getFont(), var4);
         BorderCollection var5 = var1.g.d();
         if (var5 != null && var5.d()) {
            String var6 = null;
            var6 = zaff.a(var3, 4, true);
            var4.append("border-top:" + var6 + ";");
            var6 = null;
            var6 = zaff.a(var3, 2, true);
            var4.append("border-right:" + var6 + ";");
            var6 = null;
            var6 = zaff.a(var3, 8, true);
            var4.append("border-bottom:" + var6 + ";");
            var6 = null;
            var6 = zaff.a(var3, 1, true);
            var4.append("border-left:" + var6 + ";");
            var6 = null;
            var6 = zaff.a(var3, 16, true);
            var4.append("mso-diagonal-down:" + var6 + ";");
            var6 = null;
            var6 = zaff.a(var3, 32, true);
            var4.append("mso-diagonal-up:" + var6 + ";");
         } else {
            var4.append("border:none;");
         }

         this.a(var3, var4);
         var2.append(com.aspose.cells.b.a.zr.a(var4));
      }
   }

   public void a(Style var1, StringBuilder var2) throws Exception {
      String var3 = "auto";
      String var4 = "auto";
      String var5 = "";
      String var6 = "";
      switch(var1.getPattern()) {
      case 0:
         break;
      case 1:
         if (!var1.b.a()) {
            var3 = "#" + zase.a(var1.getForegroundColor());
         }

         var5 = " none";
         break;
      default:
         if (!var1.a.a()) {
            var3 = "#" + zase.a(var1.getBackgroundColor());
         }

         if (!var1.b.a()) {
            var4 = "#" + zase.a(var1.getForegroundColor());
         }

         var5 = " " + zsl.b(var1.getPattern());
         var6 = this.a(var1);
      }

      var2.append("background:" + var3 + ";" + "mso-pattern:" + var4 + var5 + ";");
      if (!"".equals(var6)) {
         var2.append("background-image:url(\"data:image/png;base64," + var6 + "\");");
      }

   }

   private String a(Style var1) throws Exception {
      int var2 = zatm.a(var1.getPattern());
      Color var3 = Color.a(255, (Color)var1.getForegroundColor());
      Color var4 = Color.a(255, (Color)var1.getBackgroundColor());
      if (var1.a.a()) {
         var4 = Color.getWhite();
      }

      com.aspose.cells.b.a.b.a.zg var5 = new com.aspose.cells.b.a.b.a.zg(var2, var3, var4);
      byte[] var6 = com.aspose.cells.a.d.zbb.a(var5);
      com.aspose.cells.b.a.d.zh var7 = new com.aspose.cells.b.a.d.zh();
      var7.b(var6, 0, var6.length);
      return this.a(var7);
   }

   private void a(Font var1, StringBuilder var2) {
      var2.append("font-size:" + zase.y(var1.getSize()) + "pt;").append("color:#" + zase.a(var1.getColor()) + ";");
      if (var1.isItalic()) {
         var2.append("font-style:italic;");
      }

      var2.append("font-weight:" + zase.y(var1.g()) + ";").append("text-decoration:");
      if (var1.isStrikeout()) {
         var2.append("line-through");
      }

      if (var1.getUnderline() != 0) {
         var2.append(" underline");
      }

      if (!var1.isStrikeout() && var1.getUnderline() == 0) {
         var2.append("none");
      }

      if (var1.isStrikeout()) {
         var2.append(";text-line-through:single");
      } else {
         var2.append(";text-line-through:none");
      }

      if (var1.getUnderline() != 0) {
         var2.append(";text-underline-style:" + zaer.a(var1.getUnderline()));
      }

      var2.append(";font-family:\"" + var1.getName() + "\";");
   }

   private String b(zaen var1, boolean var2) throws Exception {
      if (var1.a == null) {
         return this.g(var1);
      } else {
         StringBuilder var3 = new StringBuilder(300);
         if (var1.e() == 0 && this.n.getHiddenColDisplayType() == 1) {
            return null;
         } else {
            String var4 = this.a(var1, var2);
            this.a(var3, var1, true, var2);
            String var5 = this.a(com.aspose.cells.b.a.zr.a(var3), var4);
            if (null != var5) {
               var4 = var5;
            }

            String var6 = "";
            Cell var7 = var1.a;
            String[] var8 = zaff.a(var7);
            String var9;
            int var13;
            double var18;
            String var29;
            String var34;
            int var36;
            if (var8 != null) {
               var9 = var8[0];
               var6 = var8[1];
               if (var1.g != null && (!"".equals(var1.g.getCustom()) || var1.g.getNumber() != 0)) {
                  zxu var10 = new zxu();
                  var10.a(new zhc(var7.d.h().getWorkbook(), true));
                  var6 = Cell.b(var7.c.d(), var10, var1.g, var7.d);
                  if ("num".equals(var9)) {
                     var6 = var6.trim();
                  }
               }

               var29 = var8[2];
               char var11 = var9.charAt(0);
               int var12 = this.k.a(var1.b, var1.b + var1.c);
               if (var12 == 0) {
                  var6 = zaff.a(var6, this.n.getParseHtmlTagInCell());
               }

               if (var12 > 0) {
                  int var15;
                  int var17;
                  int var19;
                  if (var11 == 's') {
                     if (this.o && var1.g != null && (var1.g.isTextWrapped() || var1.g.getRotationAngle() != 0 || var1.g.getHorizontalAlignment() == 6)) {
                        this.o = false;
                     }

                     StringBuilder var33 = new StringBuilder(var6.length() + 100);
                     boolean var20;
                     String var22;
                     boolean var41;
                     if (var7.isRichText()) {
                        var36 = 0;
                        ArrayList var38 = var1.a.J();
                        var41 = false;

                        for(var17 = 0; var17 < var38.size(); ++var17) {
                           zot var47 = (zot)var38.get(var17);
                           var19 = -1;
                           if (var47.b != null && this.l.e().b.containsKey(var47.b.j())) {
                              var19 = (Integer)this.l.e().b.get(var47.b.j());
                           }

                           String var46;
                           if (!this.o) {
                              if (var1.g.getRotationAngle() == 255) {
                                 var47.a = this.b(var47.a);
                              }

                              var46 = this.a(var47.b, var19, var47.a);
                              var33.append(var46);
                           } else {
                              var47.c = this.m.a(var47.b, var47.a);
                              if (!var41 && var36 + var47.c > var12) {
                                 var20 = false;
                                 int var48 = this.m.a(var47.b, var47.a, var12);
                                 if (var48 < 0) {
                                    var48 = 0;
                                 }

                                 if (var48 > 0) {
                                    var22 = var47.a.substring(0, 0 + var48);
                                    if (var1.g.getRotationAngle() == 255) {
                                       var22 = this.b(var22);
                                    }

                                    var22 = this.a(var47.b, var19, var22);
                                    var33.append(var22);
                                    Cell var23 = null;
                                    if (var7 != null && var7.getColumn() < this.g.getCells().getMaxColumn()) {
                                       var23 = this.g.getCells().get(var7.getRow(), var7.getColumn() + 1);
                                    }

                                    if (this.n.getParseHtmlTagInCell()) {
                                       if (var23 != null && var23.getValue() != null) {
                                          var20 = true;
                                       }

                                       if (var23 != null && var23.getValue() == null) {
                                          var20 = true;
                                          int var24 = 0;
                                          boolean var25 = true;

                                          for(Column var26 = null; zaff.b(var1.g, var23.getStyle()) && null == var23.getValue(); var23 = this.g.getCells().get(var23.getRow(), var23.getColumn() + 1)) {
                                             var26 = this.g.getCells().checkColumn(var23.getColumn());
                                             if (null == var26) {
                                                var24 += this.g.getCells().getStandardWidthPixels();
                                             } else {
                                                var24 += var26.a();
                                             }

                                             var26 = null;
                                             if (var24 + var12 > var36) {
                                                var25 = false;
                                                var20 = false;
                                                break;
                                             }

                                             if (var23 == null || var23.getColumn() >= this.g.getCells().getMaxColumn()) {
                                                break;
                                             }
                                          }

                                          if (var24 > 0 && var25) {
                                             var47.a = var47.a.substring(var48);
                                             var48 = this.m.a(var47.b, var47.a, var24);
                                             if (var48 > 0) {
                                                String var27 = var47.a.substring(0, 0 + var48);
                                                if (var1.g.getRotationAngle() == 255) {
                                                   var27 = this.b(var27);
                                                }

                                                var27 = this.a(var47.b, var19, var27);
                                                var33.append(var27);
                                             }
                                          }
                                       }

                                       if (var20) {
                                          var33.append("<span style='display:none'>");
                                       }
                                    }
                                 }

                                 var22 = var48 > 0 ? var47.a.substring(var48) : var47.a;
                                 if (var1.g.getRotationAngle() == 255) {
                                    var22 = this.b(var22);
                                 }

                                 var22 = this.a(var47.b, var19, var22);
                                 var33.append(var22);
                                 var41 = true;
                              } else {
                                 if (var1.g.getRotationAngle() == 255) {
                                    var47.a = this.b(var47.a);
                                 }

                                 var46 = this.a(var47.b, var19, var47.a);
                                 var33.append(var46);
                              }

                              var36 += var47.c;
                           }
                        }

                        if (var41 && this.o) {
                           var33.append("</span>");
                        }

                        var6 = com.aspose.cells.b.a.zr.a(var33);
                     } else {
                        if (!this.o) {
                           if (var1.g.getRotationAngle() == 255) {
                              var6 = this.b(var6);
                           }

                           var6 = zaff.a(var6, this.n.getParseHtmlTagInCell());
                        } else {
                           var36 = this.m.a(var1.g, var6);
                           if (var36 > var12) {
                              var15 = this.m.a(var1.g, var6, var12);
                              var41 = false;
                              Cell var42 = null;
                              if (var7 != null && var7.getColumn() < this.g.getCells().getMaxColumn()) {
                                 var42 = this.g.getCells().get(var7.getRow(), var7.getColumn() + 1);
                              }

                              String var44;
                              if (var15 > 0) {
                                 var44 = var6.substring(0, 0 + var15);
                                 if (var1.g.getRotationAngle() == 255) {
                                    var44 = this.b(var44);
                                 }

                                 var44 = zaff.a(var44, this.n.getParseHtmlTagInCell());
                                 var33.append(var44);
                                 if (this.n.getParseHtmlTagInCell()) {
                                    if (var42 != null && var42.getValue() != null) {
                                       var41 = true;
                                    }

                                    if (var42 != null && var42.getValue() == null) {
                                       var41 = true;
                                       var19 = 0;
                                       var20 = true;

                                       for(Column var21 = null; zaff.b(var1.g, var42.getStyle()) && null == var42.getValue(); var42 = this.g.getCells().get(var42.getRow(), var42.getColumn() + 1)) {
                                          var21 = this.g.getCells().checkColumn(var42.getColumn());
                                          if (null == var21) {
                                             var19 += this.g.getCells().getStandardWidthPixels();
                                          } else {
                                             var19 += var21.a();
                                          }

                                          var21 = null;
                                          if (var19 + var12 > var36) {
                                             var20 = false;
                                             var41 = false;
                                             break;
                                          }

                                          if (var42 == null || var42.getColumn() >= this.g.getCells().getMaxColumn()) {
                                             break;
                                          }
                                       }

                                       if (var19 > 0 && var20) {
                                          var6 = var6.substring(var15);
                                          var15 = this.m.a(var1.g, var6, var19);
                                          if (var15 > 0) {
                                             var22 = var6.substring(0, 0 + var15);
                                             if (var1.g.getRotationAngle() == 255) {
                                                var22 = this.b(var22);
                                             }

                                             var22 = zaff.a(var22, this.n.getParseHtmlTagInCell());
                                             var33.append(var22);
                                          }
                                       }
                                    }

                                    if (var41) {
                                       var33.append("<span style='display:none'>");
                                    }
                                 }
                              }

                              var44 = var15 > 0 ? var6.substring(var15) : var6;
                              if (var1.g.getRotationAngle() == 255) {
                                 var44 = this.b(var44);
                              }

                              var44 = zaff.a(var44, this.n.getParseHtmlTagInCell());
                              var33.append(var44);
                              if (var15 > 0 && var41) {
                                 var33.append("</span>");
                              }

                              var6 = com.aspose.cells.b.a.zr.a(var33);
                           } else {
                              if (var1.g.getRotationAngle() == 255) {
                                 var6 = this.b(var6);
                              }

                              var6 = zaff.a(var6, this.n.getParseHtmlTagInCell());
                           }
                        }

                        if (var1.g != null) {
                           Font var37 = var1.g.q();
                           if (var37 != null) {
                              if (var37.isSuperscript()) {
                                 var6 = "<sup>" + var6 + "</sup>";
                              } else if (var37.isSubscript()) {
                                 var6 = "<sub>" + var6 + "</sub>";
                              }
                           }
                        }
                     }
                  } else if (!this.o) {
                     if (var1.g.getRotationAngle() == 255) {
                        var6 = this.b(var6);
                     }

                     var6 = zaff.a(var6, this.n.getParseHtmlTagInCell());
                  } else {
                     var13 = this.m.a(var1.g, var6) + 3;
                     if (var13 > var12) {
                        boolean var14 = true;
                        var15 = this.m.a(var1.g, var6, var12);
                        if (var7.c.g() == 4 && var1.b() && var15 > 0) {
                           try {
                              String var16 = var6.substring(0, 0 + var15);
                              var17 = var7.getIntValue();
                              var18 = zase.B(var16);
                              if (var18 >= (double)var17) {
                                 var14 = false;
                              }
                           } catch (Exception var28) {
                              ;
                           }
                        }

                        if (var14) {
                           int var39 = this.m.a(var1.g, "#");
                           var17 = var12 / var39 + 1;
                           StringBuilder var43 = new StringBuilder(var17);

                           for(var19 = 0; var19 < var17; ++var19) {
                              var43.append('#');
                           }

                           var6 = com.aspose.cells.b.a.zr.a(var43);
                        }
                     }
                  }
               }

               switch(var11) {
               case 'b':
               case 'e':
                  var3.append(" align=center");
                  var3.append(" x:err=\"").append(var29).append("\"");
                  break;
               case 'n':
                  if (var29 != null) {
                     var3.append(" align=right");
                     var3.append(" x:num=\"").append(var29).append("\"");
                  }
                  break;
               case 's':
                  var34 = var8[1];
                  if (!var7.isFormula() && var1.g.getRotationAngle() != 255 && null != var34 && var34.length() > 0 && var34.charAt(0) == '=') {
                     var3.append(" x:str=\"'").append(zaff.c(var29)).append("\"");
                  }
               }
            }

            var9 = var7.getFormula();
            if (var9 != null && var9.length() > 0) {
               if (var7.isInArray()) {
                  var3.append(" x:arrayrange=\"" + var7.getName() + "\"");
               }

               var3.append(" x:fmla=\"").append(zaff.a(var9)).append("\"");
            }

            if (var4 != null && !var4.trim().equals("")) {
               var3.append(var4);
            }

            var3.append(">");
            var29 = this.f(var1);
            if (var29 != null) {
               var3.append(var29);
            }

            boolean var30 = false;
            if (var1.c()) {
               StringBuilder var31 = new StringBuilder(50);
               var31.append("<a ");
               if (var1.q != null) {
                  var31.append("name=\"");
                  var31.append(var1.q);
                  var31.append("\" ");
               }

               if (var1.h != null) {
                  var34 = this.a(var1.h);
                  var36 = var1.h.a(this.l.g.getWorksheets());
                  var31.append("href=\"");
                  if (this.l.a() && var36 == 1) {
                     var31.append("../");
                  }

                  var31.append(var34);
                  var31.append("\" ");
                  if (var36 == 0 || var36 == 1) {
                     var31.append("target=\"_parent\"");
                  }
               }

               var31.append(">");
               if (var7.r() != 15 && var7.r() != -1) {
                  var30 = true;
                  var31.append("<span style='");
                  this.a(var1.g.getFont(), var31);
                  var31.append("'>");
               }

               var3.append(com.aspose.cells.b.a.zr.a(var31));
            }

            if (var7.getStyle().getRotationAngle() != 0 && var7.getStyle().getRotationAngle() != 255) {
               Style var32 = var7.getStyle();
               boolean var35 = false;
               var13 = -var32.getRotationAngle();
               double var40 = (double)var13 * 3.141592653589793D / 180.0D;
               double var45 = Math.cos(var40);
               var18 = -Math.sin(var40);
               double var49 = Math.sin(var40);
               double var50 = Math.cos(var40);
               var6 = "<div style='transform: rotate(" + var13 + "deg);" + "-o-transform: rotate(" + var13 + "deg);" + "-webkit-transform: rotate(" + var13 + "deg);" + "-moz-transform: rotate(" + var13 + "deg);" + "-ms-transform: rotate(" + var13 + "deg);" + "filter: progid:DXImageTransform.Microsoft.Matrix(M11=" + var45 + ",M12=" + var18 + ",M21=" + var49 + ",M22=" + var50 + ",SizingMethod='auto expand');" + "-ms-filter: \"progid:DXImageTransform.Microsoft.Matrix(M11=" + var45 + ",M12=" + var18 + ",M21=" + var49 + ",M22=" + var50 + ",SizingMethod='auto expand')\";" + "'>" + var6 + "</div>";
            }

            var3.append(var6);
            if (var30) {
               var3.append("</span>");
            }

            if (var1.c()) {
               var3.append("</a>");
            }

            if (var29 != null) {
               var3.append("</font>");
            }

            var3.append("</td>");
            return com.aspose.cells.b.a.zr.a(var3);
         }
      }
   }

   private String f(zaen var1) {
      if (var1.a != null && var1.a.getType() == 4) {
         Color var2 = Color.getEmpty();
         switch(var1.g.getNumber()) {
         case 0:
            String var3 = var1.g.getCustom();
            if (var3 != null && !"".equals(var3)) {
               var2 = zatm.a(var1.a.getDoubleValue(), var3, var2);
            }
            break;
         case 6:
         case 8:
         case 38:
         case 40:
            if (var1.a.getDoubleValue() < 0.0D) {
               var2 = Color.getRed();
            }
         }

         return !var2.isEmpty() ? "<font color=\"#" + zase.a(var2) + "\" style='mso-ignore:color'>" : null;
      } else {
         return null;
      }
   }

   private String a(Border var1, int var2) {
      StringBuilder var3 = new StringBuilder(20);
      switch(var2) {
      case 1:
         var3.append("border-left:");
         break;
      case 2:
         var3.append("border-right:");
         break;
      case 3:
      case 5:
      case 6:
      case 7:
      default:
         return null;
      case 4:
         var3.append("border-top:");
         break;
      case 8:
         var3.append("border-bottom:");
      }

      int var4 = var1.getLineStyle();
      String var5 = zaff.f(var4);
      var3.append(var5);
      if (!"none".equals(var5)) {
         if (!var1.a.a()) {
            var3.append(" #" + zase.a(var1.getColor()) + ";");
         } else {
            var3.append(" windowtext;");
         }
      } else {
         var3.append(";");
      }

      return com.aspose.cells.b.a.zr.a(var3);
   }

   private String a(Hyperlink var1) {
      String var2 = null;
      CellArea var3 = null;
      String[] var4 = new String[]{var2};
      CellArea[] var5 = new CellArea[]{var3};
      boolean var6 = zaff.a(this.l.g.getWorksheets(), var1, var4, var5);
      var2 = var4[0];
      var3 = var5[0];
      if (var6) {
         if (com.aspose.cells.b.a.zv.b(var2, this.g.getName())) {
            var2 = "";
         }

         String var7 = "";
         if (var1.getAddress().indexOf("!") == -1) {
            var7 = "#" + var1.getAddress();
         } else {
            var7 = zaff.a(var3);
         }

         String var8 = this.l.a(var2);
         return var8 + var7;
      } else {
         return var1.getAddress();
      }
   }

   private String a(Font var1, int var2, String var3) {
      String var4 = "";
      if (var2 != -1) {
         var4 = var4 + "<font class=\"font" + zase.y(var2) + "\">";
         if (var1.isSuperscript()) {
            var4 = var4 + "<sup>";
         } else if (var1.isSubscript()) {
            var4 = var4 + "<sub>";
         }
      }

      var4 = var4 + zaff.a(var3, this.n.getParseHtmlTagInCell());
      if (var2 != -1) {
         if (var1.isSuperscript()) {
            var4 = var4 + "</sup>";
         } else if (var1.isSubscript()) {
            var4 = var4 + "</sub>";
         }

         var4 = var4 + "</font>";
      }

      return var4;
   }

   private String g(zaen var1) throws Exception {
      StringBuilder var2 = new StringBuilder(200);
      String var3 = this.a(var1, false);
      this.a(var2, var1, true, false);
      String var4 = this.a(com.aspose.cells.b.a.zr.a(var2), var3);
      if (null != var4) {
         var3 = var4;
      }

      var2.append(var3);
      var2.append(">");
      if (var1.q != null) {
         var2.append("<a name=\"");
         var2.append(var1.q);
         var2.append("\">");
         var2.append("</a>");
      }

      var2.append("</td>");
      return com.aspose.cells.b.a.zr.a(var2);
   }

   boolean g() {
      return this.i == null && this.h.size() == 0 && (this.a == null || this.a.size() == 0) && (this.b == null || this.b.size() == 0) && (this.c == null || this.c.size() == 0) && (this.d == null || this.d.size() == 0);
   }

   ArrayList h() {
      ArrayList var1 = this.k.d();
      ArrayList var2 = new ArrayList(var1.size());

      for(int var3 = 0; var3 < var1.size(); ++var3) {
         zaeg var4 = (zaeg)var1.get(var3);
         StringBuilder var5 = new StringBuilder(200);
         StringBuilder var6 = new StringBuilder(100);
         var5.append("  <td");
         var6.append(" style='");
         if (var3 == 0) {
            double var7 = this.i();
            var5.append(" height=").append(zase.y(this.m.a(var7)));
            var6.append("height:" + zase.b(var7) + "pt");
         }

         if (var4.b > 1) {
            if (var6.length() > 8) {
               var6.append(";");
            }

            var5.append(" colspan=").append(zase.y(var4.b));
            var6.append("mso-ignore:colspan;");
         }

         int var9 = var4.e;
         if (var9 != 15 && var9 != -1) {
            var5.append(" class=").append(this.l.c().getCellCssPrefix()).append("x").append(zase.y(var9));
         }

         if (var6.length() > 8) {
            var6.append("'");
            var5.append(com.aspose.cells.b.a.zr.a(var6));
         }

         var5.append("></td>");
         String var8 = com.aspose.cells.b.a.zr.a(var5);
         com.aspose.cells.b.a.a.ze.a(var2, (Object)var8);
      }

      return var2;
   }

   double i() {
      double var1 = 0.0D;
      int var3 = this.d() + this.b();

      for(int var4 = this.d(); var4 < var3; ++var4) {
         var1 += this.g.getCells().getRowHeight(var4);
      }

      return var1;
   }

   String b(String var1) {
      StringBuilder var2 = new StringBuilder(100);

      for(int var3 = 0; var3 < var1.length(); ++var3) {
         if (var3 == var1.length() - 1) {
            var2.append(var1.charAt(var3));
         } else {
            var2.append(var1.charAt(var3)).append("\r");
         }
      }

      return com.aspose.cells.b.a.zr.a(var2);
   }

   private String a(String var1, String var2) {
      int var3 = var1.indexOf("id='tc");
      int var4 = var2.indexOf("id='t");
      if (var3 != -1 && var4 != -1) {
         int var5 = var1.indexOf("'", var3 + "id='tc".length());
         String var6 = var1.substring(var3 + 4, var3 + 4 + (var5 - var3 - 4));
         int var7 = var2.indexOf("'", var4 + "id='t".length());
         String var8 = var2.substring(var4 + 4, var4 + 4 + (var7 - var4 - 4));
         HashMap var9 = (HashMap)this.l.d.get(this.g.m());
         if (var9 == null) {
            var9 = new HashMap();
            var9.put(var8, var6);
            this.l.d.put(this.g.m(), var9);
         } else {
            var9.put(var8, var6);
         }

         return com.aspose.cells.b.a.zv.a(var2, var4, var7 - var4 + 1);
      } else {
         return null;
      }
   }
}
